home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / g_man / cat3 / standard / readrgb.z / readrgb
Text File  |  1998-10-20  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. rrrreeeeaaaaddddRRRRGGGGBBBB((((3333GGGG))))                                                        rrrreeeeaaaaddddRRRRGGGGBBBB((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      rrrreeeeaaaaddddRRRRGGGGBBBB - gets values of specific pixels
  10.  
  11. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  12.      lllloooonnnngggg rrrreeeeaaaaddddRRRRGGGGBBBB((((nnnn,,,, rrrreeeedddd,,,, ggggrrrreeeeeeeennnn,,,, bbbblllluuuueeee))))
  13.      sssshhhhoooorrrrtttt nnnn;;;;
  14.      RRRRGGGGBBBBvvvvaaaalllluuuueeee rrrreeeedddd[[[[]]]],,,, ggggrrrreeeeeeeennnn[[[[]]]],,,, bbbblllluuuueeee[[[[]]]];;;;
  15.  
  16. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  17.      _n       expects the number of pixels to be read by the function.
  18.  
  19.      _r_e_d     expects the array in which the pixel red values will be stored.
  20.  
  21.      _g_r_e_e_n   expects the array in which the pixel green values will be stored.
  22.  
  23.      _b_l_u_e    expects the array in which the pixel blue values will be stored.
  24.  
  25. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  26.      The returned value of this function is the number of pixels actually
  27.      read.  A returned function value of 0 indicates an error, namely, that
  28.      the starting point is not a valid character position.
  29.  
  30. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  31.      rrrreeeeaaaaddddRRRRGGGGBBBB attempts to read up to _n pixel values from the bitplanes in RGB
  32.      mode.  It reads them into the _r_e_d, _g_r_e_e_n, and _b_l_u_e arrays starting from
  33.      the current character position along a single scan line (constant _y) in
  34.      the direction of increasing _x.  rrrreeeeaaaaddddRRRRGGGGBBBB returns the number of pixels
  35.      read, which is the number requested if the starting point is a valid
  36.      character position (inside the current viewport).  rrrreeeeaaaaddddRRRRGGGGBBBB returns zero
  37.      if the starting point is not a valid character position.  The values of
  38.      pixels read outside of the viewport or screen are undefined.
  39.  
  40.      rrrreeeeaaaaddddRRRRGGGGBBBB updates the current character position to one pixel to the right
  41.      of the last one read; the current character position is undefined if the
  42.      new position is outside the viewport.
  43.  
  44.      Pixels are read from the currently active framebuffer, as specified by
  45.      ddddrrrraaaawwwwmmmmooooddddeeee.
  46.  
  47.      Thus, to read pixel values from the overlay bitplanes, for example,
  48.      simply set ddddrrrraaaawwwwmmmmooooddddeeee to OOOOVVVVEEEERRRRDDDDRRRRAAAAWWWW. Use rrrreeeeaaaaddddssssoooouuuurrrrcccceeee to specify the pixel
  49.      source within the current framebuffer (backbuffer, frontbuffer, or z-
  50.      buffer, for example) from which both rrrreeeeccccttttrrrreeeeaaaadddd and llllrrrreeeeccccttttrrrreeeeaaaadddd take pixel
  51.      values.
  52.  
  53.      In RGB double buffer mode, only the back buffer is read by default.  On
  54.      machines that support it, you can use rrrreeeeaaaaddddssssoooouuuurrrrcccceeee to control which buffer
  55.      is read.
  56.  
  57.      The system must be in RGB mode for rrrreeeeaaaaddddRRRRGGGGBBBB to function correctly.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. rrrreeeeaaaaddddRRRRGGGGBBBB((((3333GGGG))))                                                        rrrreeeeaaaaddddRRRRGGGGBBBB((((3333GGGG))))
  71.  
  72.  
  73.  
  74. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  75.      lrectread, readsource, drawmode
  76.  
  77. NNNNOOOOTTTTEEEESSSS
  78.      rrrreeeeaaaaddddRRRRGGGGBBBB should not be used in new development.  Rather, pixels should be
  79.      read using the high-performance llllrrrreeeeccccttttrrrreeeeaaaadddd command.
  80.  
  81.      This routine is available only in immediate mode.
  82.  
  83.      RGB pixels are written as 24-bit RGB triples. On systems with less than
  84.      the full bitplane configuration, the least significant bits of each R, G,
  85.      and B value are not used when pixels are read from the framebuffer.  This
  86.      means that on 8-bit systems, the least significant 5 bits of each RGB
  87.      value are not used, and on 12 bitplane systems, the least significant 4
  88.      bits are set not used.
  89.  
  90.      On IRIS-4D GT and GTX models, returned bits that do not correspond to
  91.      valid bitplanes are undefined. Other models return zero in these bits.
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.